package demo1;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xiaotutu
 * Date: 2023-10-24
 * Time: 20:38
 */

class Base {
    public int a = 8;

    public int b;
    public void methodB() {
        System.out.println("methodB");
    }

}

class Derived extends Base {
    public int a = 199;

    public void methodD() {
        System.out.println(a);
        System.out.println(super.a);

        System.out.println(b);
        System.out.println("methodD");
    }
    public void test() {
        methodB();
        methodB('c');
    }

    public void methodB(char ch) {
        System.out.println("methodB - char ch");
    }

}

public class TestDemo2 {
    public static void main(String[] args) {
        Derived derived = new Derived();
        derived.test();
        // System.out.println(derived.a);
    }
}
